Skip to content

[Aider 0.75.2] [anthropic/claude-3-7-sonnet-20250219] [$0.10] [🔴 doesn't work] feat: add code versioning with ability to view and restore previous versions#145

Draft
minervathebot wants to merge 1 commit intomainfrom
feat/aider-claude-3.7-95
Draft

[Aider 0.75.2] [anthropic/claude-3-7-sonnet-20250219] [$0.10] [🔴 doesn't work] feat: add code versioning with ability to view and restore previous versions#145
minervathebot wants to merge 1 commit intomainfrom
feat/aider-claude-3.7-95

Conversation

@minervathebot
Copy link
Member

@minervathebot minervathebot commented Mar 9, 2025

How does this PR impact the user?

Description

This PR was created by aider ran with:

aider --model anthropic/claude-3-7-sonnet-20250219 --yes-always

Prompt:

Please, solve the following issue. Title: feat: add code versions and an option to revert to a previous version. Description: Goal: let the user revert to the previous code version
Proposed implementation:

  • every time the user submits code, store it separately, don't overwrite the previous code version
    • we can use filenames with dates in them, for example: <userid>-<timestamp>.js
    • use a special name, like <userid>-latest.js for the latest code version so we can quickly retrieve it by path
  • add a modal that will allow the user to view previous submissions in the UI and revert to them
    • the button to open a modal should be above the code editor
    • the modal left side should be occupied by the read-only code editor
    • the modal on the right side should be occupied by the list of versions
    • user can click any of the versions to preview them in the modal
    • user can click the restore button to restore the version
    • restoring the code doesn't create a new version until the user submits the code again
      Let me know if you want to work on this ticket and if you have any questions!

Cost: $0.10 USD.

Notes

It never displays any code versions.

Also, the approach is wrong:

  1. We shouldn't load all versions code in memory altogether
  2. We shouldn't accept userId argument when fetching version; instead we should get the userId from the session. The user may only fetch their own code versions.
image

Checklist

  • my PR is focused and contains one wholistic change
  • I have added screenshots or screen recordings to show the changes

@yurijmikhalevich yurijmikhalevich changed the title [Aider] [Claude 3.7] [$0.10] feat: add code versioning with ability to view and restore previous versions [Aider] [Claude 3.7] [$0.10] [🔴 doesn't work] feat: add code versioning with ability to view and restore previous versions Mar 22, 2025
@yurijmikhalevich yurijmikhalevich changed the title [Aider] [Claude 3.7] [$0.10] [🔴 doesn't work] feat: add code versioning with ability to view and restore previous versions [Aider 0.75.2] [anthropic/claude-3-7-sonnet-20250219] [$0.10] [🔴 doesn't work] feat: add code versioning with ability to view and restore previous versions Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants